home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44b.zip / MSG001.QM < prev    next >
Text File  |  1992-05-27  |  10KB  |  196 lines

  1. *                               msg001.qm
  2. *        Macros To Make Index of OffLine Message Reader Messages
  3. *                        Written By Tom Hogshead
  4. *                       [ See MSGxx.QM For Use ]
  5. *                                 5/30/92
  6. *  Key      Subfile            Description
  7. * =====  ============   =================================================
  8. *  @2                   Make Index of Messages In Saved Message File ( )
  9. *  @8                   Remove Index of Messages Made with @2
  10. *  @4                   Make File of Message Headers
  11. *
  12. *        {e:\up\MSG??}  Return To MSGxx.QM
  13. *
  14. *-- eoi
  15.  
  16. *                           M A C R O S
  17. * --------------------------------------------------------------
  18. * @(2) Make Index of OffLine Mail Reader Messages, v2.15 Only
  19. * --------------------------------------------------------------
  20. * This macro is useful for keeping track of saved messages by making an
  21. * Index of all the messages in an OffLine mail reader saved message
  22. * file and inserting it at the top of the saved message file as shown
  23. * below.  After indexing, any message may be easily and quickly viewed
  24. * using AMAC macros in JMPPOSxx.QM (@2-@8) and BOOKxx.QM (@f, @1 or @4).
  25. * Message Index format is as follows:
  26.  
  27. * Number    Date  Conf           To/From               Subject
  28. * (3574)  08-28-91 22  MEL HULSE/DENNIS MCCUNNEY       Qedit Menu
  29. * (2498)  04-24-91 22  TOM HOGSHEAD/DENNIS MCCUNNEY    OffLine Readers
  30.  
  31. * NOTE: This macro makes an Index header on line 1 of the saved message
  32. *       file if it has not already been made.  If an Index header has
  33. *       already been made the Index is updated with message header
  34. *       details from all messages added since the last Indexing.  The
  35. *       'Subject' cannot include the following words each followed by a
  36. *       colon: "ber, Date, From, To, Subj, and Conf".  The word "ber",
  37. *       followed by a colon and a blank space, must not exist anywhere
  38. *       in the saved message file since this is the expression used to
  39. *       determine if there are any UnIndexed messages.  This macro
  40. *       encloses the Message Number with ( ) as a bookmark to be
  41. *       located and moved to using BOOKxx.QM macros.  The ( ) enclosing
  42. *       Conference Number are also removed to not conflict with Message
  43. *       Number bookmarks as shown below:
  44.  
  45. *                                   (parenthesis added)
  46. *  BBS: SemWare Support BBS                 v    v
  47. * Date: 08-25-91 (00:54)             Number:(3562)
  48. * From: MEL HULSE                    Refer#: 3548
  49. *   To: DENNIS MCCUNNEY               Recvd: NO
  50. * Subj: Qedit Menu                     Conf:  22  RelayNet
  51. *                                            ^  ^
  52. *                                   (parenthesis removed)
  53.  
  54. @2      MacroBegin
  55.         SETSCREENOFF
  56.         SaveSettings
  57.         DefaultWordSet SetInsMode SetSoundOff SetWordWrapMode ToggleWordWrap
  58.         Find "ber" ": " Return "G" Return jfalse END  * Test if any new msgs
  59. * ------------------ Insert Message Header if None ------------------*
  60.         Begfile isEmptyLine jtrue 1  EndLine
  61.         Find BackSpace BackSpace Return "B" Return jtrue 2  InsertLine
  62.     1:  BegLine "*" CursorRight "Number"
  63.         GoToColumn "13" Return  "Date"
  64.         GoToColumn "19" Return  "Conf"
  65.         GoToColumn "34" Return  "To/From"
  66.         GoToColumn "56" Return  "Subject"
  67.     2:  * AddLine                                                          *|
  68.         OneWindow HorizontalWindow EditFile Escape
  69. * ------------------- Locate Next UnIndexed Message -------------------*
  70.     PrevFile                                        * Message file window 2
  71.     AGAIN:
  72.         Find "ber" ": " Return "G" Return jfalse END                                      * End macro if all done
  73.         WordRight Backspace MarkWord StoreScrBuff "n" Return    * Store msg #
  74.         "(" GoToBlockEnd ")"                        * Bookmark numb as indexed
  75.         Find "Date" ":" Return "B" Return           * Find Date
  76.         CursorUp CursorUp InsertLine
  77.         BegLine "*" CursorRight #031 #030           * Insert JMPPOS marker
  78.         CursorDown CursorDown CursorDown WordRight UnMarkBlock
  79.         MarkCharacter WordRight WordRight WordRight CursorLeft CursorLeft
  80.             StoreScrBuff "d" Return                 * Store Date
  81.         Find "From" ":" Return DelLine Return       * Find From
  82.         WordRight UnmarkBlock DropAnchor CursorRight 25 DropAnchor
  83.             StoreScrBuff "f" Return                 * Store From
  84.         CursorUp CursorUp
  85.         Find "To"   ":" Return DelLine Return       * Find To
  86.         WordRight UnmarkBlock MarkCharacter CursorRight 25
  87.             StoreScrBuff "t" Return                 * Store To
  88.         Find "Subj" ":" Return DelLine Return       * Find Subj
  89.         WordRight UnmarkBlock MarkCharacter GoToColumn "35" Return
  90.             StoreScrBuff "s" Return UnMarkBlock
  91.         Find "Conf" ":" Return DelLine Return       * Find Conf
  92.         MarkCharacter CursorRight 20 MarkCharacter
  93.         GoToBlockBeg Find "(" Return "L" Return     * Move to '(' if exist
  94.         WordRight MarkWord                          * Mark Conf #
  95.             StoreScrBuff "c" Return                 * Store Conf #
  96.         UnMarkBlock Endline
  97.         Find "Conf" ":" Return "B" Return           * Find Conf
  98.         MarkCharacter CursorRight 20 MarkCharacter
  99. * -------- Next lines remove "(" and ")" from Conference # --------*
  100.         GoToBlockBeg
  101.         FindReplace "(" Return " " Return "LN" Return
  102.         FindReplace ")" Return " " Return "LN" Return
  103.         UnMarkBlock
  104.    PrevWindow                                       * Return to Index
  105. * -------------- Insert Indexed Message Info Into Index --------------*
  106.         BegFile AddLine
  107.         "*" CursorRight "("             GetScrBuff "n" Return EndLine ")"
  108.         GoToColumn "11" Return          GetScrBuff "d" Return
  109.         EndLine CursorRight             GetScrBuff "c" Return
  110.         GoToColumn "24" Return          GetScrBuff "t" Return
  111.         EndLine "/"                     GetScrBuff "f" Return
  112.         GoToColumn "56" Return DelToEol GetScrBuff "s" Return
  113.         UnMarkBlock ZoomWindow SetScreenOn SetScreenOff
  114.     NextWindow                                       * Window 2
  115.     Jump AGAIN
  116.     END: ToggleWordWrap BegFile OneWindow RestoreSettings
  117. *
  118. * 461 bytes Fri  09-06-1991  11:17:19 (TH @1, sent to ALL Conf 3, #637)
  119. * 454 bytes Sat  09-07-1991  09:42:04 (TH @2, |a, QEdit v2.15, 3/639, 22/3629)
  120. * 464 bytes Sun  09-08-1991  15:09:20 (TH @2)
  121. * 464 bytes Sun  09-22-1991  00:55:03 (TH @2, for 3 digit Conf #'s)
  122. * 452 bytes Mon  09-30-1991  19:40:19 (TH @2, shortened)
  123. * 449 bytes Fri  10-11-1991  10:38:09 (TH @2, changed To/From)
  124. * 448 bytes Sun  10-27-1991  02:08:45 (TH @2, removed unmarkblock |)
  125. * 450 bytes Wed  11-20-1991  13:08:45 (TH @2, added SaveSettings, sent #3/775)
  126. * 449 bytes Sat  05-16-1992  12:21:46 (TH @2, removed addline *|)
  127.  
  128. * 
  129. * -------------------------------------------------
  130. * @(4) Makes a File of Message Headers, v2.15 Only
  131. * -------------------------------------------------
  132. * This macro makes a file 'c:\$.hdr' of message headers only, no
  133. * contents.  Change 'c:\$.hdr' to your ram drive for faster operation.
  134.  
  135. @4      MacroBegin
  136.         SETSCREENOFF
  137.         BegFile UnMarkBlock DropAnchor
  138.         EditFile "c:\$.hdr" Return KillFile Quit
  139.         WriteBlock Return "O" backspace
  140.         StoreScrBuff "header" Return DeleteBlock
  141.     LOOP: Find "Date" ":" Return DelLine Return jfalse END
  142.         CursorUp CursorUp UnmarkBlock MarkLine CursorDown
  143.         Find "Subj" ":" Return DelLine Return
  144.         CursorDown MarkLine AppendScrBuff "header" Return jump LOOP
  145.     END: GetScrBuff "header" Return WriteBlock Return "O"
  146.         DeleteBlock EditFile Return DelLine
  147. *
  148. * 123 bytes Thu  09-05-1991  23:26:09 (TH @4)
  149. * 125 bytes Sun  10-27-1991  01:57:01 (TH @4, changed WriteBlock)
  150.  
  151. * 
  152. * ----------------------------------------------------------------------
  153. * @(8) UnIndex All Messages in Saved Message File, v2.15 Only
  154. * ----------------------------------------------------------------------
  155. * This macro UnIndexes a saved message file by removing the last Index
  156. * made with @2 from the top of the file, removing the left and right
  157. * parentheses from message number, and deleting the JMPPOS marker.  The
  158. * unindexed file is restored to it's original condition with two
  159. * exceptions:
  160. *     1) Parentheses removed from Conference number using @2 are
  161. *        not replaced with @8.
  162. *     2) Messages captured from SemWare BBS not using an OffLine
  163. *        message reader have the Conference number following the
  164. *        Conference name.  SLMR messages precede the Conference name
  165. *        with number.  These BBS captured messages will not be
  166. *        re-indexed correctly after UnIndexing with @8 unless the
  167. *        Conference name is manually removed before re-indexing with @2.
  168.  
  169. *     SemWare output: ->          Conf: RELAYNET (22)
  170. *     SLMR output:    ->          Conf: (22) RelayNet
  171.  
  172. @8      MacroBegin
  173.         SetScreenOff
  174.         Begfile EndLine BegLine jfalse FIND                                     * If blank, only add hdr
  175.         EndLine Find "ber" Return "B" Return jfalse FIND
  176.         unmarkblock markline endpara cursordown deleteblock * Delete last Indx
  177.     FIND: Find "ber" ":(" Return DelLine Return jfalse END
  178.         UnMarkBlock MarkCharacter EndLine MarkCharacter BegLine
  179.         FindReplace
  180.             "ber" ":(" Return
  181.             "ber" ": " Return "LN" Return           * Remove '(' from Number
  182.         FindReplace
  183.               ")" Return
  184.               "  " Return "LN" Return               * Remove '(' from Number
  185.         CursorUp CursorUp CursorUp BegLine UnMarkBlock MarkLine MarkLine
  186.         Find #31 #30 Return "L" Return jfalse FIND
  187.         DelLine                                     * Delete JMPPOS marker
  188.         CursorDown CursorDown CursorDown
  189.     jump FIND
  190.     END: begfile
  191. *
  192. * 123 bytes Sun  09-08-1991  17:57:27 (TH @8)
  193. * 122 bytes Sun  10-27-1991  02:15:24 (TH @8, removed unmarkblock)
  194.  
  195.  
  196.